package org.lbroussal.client.controller;

import org.lbroussal.client.ApplicationFacade;
import org.puremvc4gwt.client.interfaces.ICommand;
import org.puremvc4gwt.client.interfaces.INotification;
import org.puremvc4gwt.client.patterns.command.SimpleCommand;

public class ProcessLogout extends SimpleCommand<ApplicationFacade> implements ICommand {

    public void execute(INotification notification) {

        doLogout();
    }

    public void doLogout() {
        facade.getUserDataScope().clear();

        this.notifyObservers(ApplicationFacade.LOGIN);
    }
}
